//导入 db 函数
const db = require('./db/db');
const ComputerModel = require('./models/ComputerModel');

db(() => {
    //文档插入 insertMany  updateOne  remove  find
    ComputerModel.create({
        brand: 'ThinkPad',
        price: 4299,
        color: '高级黑'
    }, (err, data) => {
        if(err) throw err;
        console.log(data);
    });
}, () => {
    console.log('连接失败, 请重试!!');
});

